Ubuntu 10.04
Sponsored Link

Set CNAME
2010/07/19
  If you'd like to set another name to your Host, define CNAME record in zone file.

[1] Set CNAME record in zone file.
root@ubuntu:~#
vi /etc/bind/srv.world.lan


$TTL 86400
@
IN
SOA
ubuntu.srv.world. root.srv.world. (

# update serial

2010071902
;Serial

3600
;Refresh

1800
;Retry

604800
;Expire

86400
;Minimum TTL

)
IN
NS
ubuntu.srv.world.

IN
A
10.0.0.50

IN
MX 10
ubuntu.srv.world.


ubuntu
IN
A
10.0.0.50

# aliase IN CNAME server's name

ftp
IN
CNAME
ubuntu.srv.world.


root@ubuntu:~#
rndc reload

server reload successful
root@ubuntu:~#
dig ftp.srv.world.


; <<>> DiG 9.7.0-P1 <<>> ftp.srv.world.
;; global options: +cmd
;; Got answer:
;; -<<HEADER>>- opcode: QUERY, status: NOERROR, id: 9861
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;ftp.srv.world.
IN
A


;; ANSWER SECTION:
ftp.srv.world.
86400
IN
CNAME
ubuntu.srv.world.

ubuntu.srv.world.
86400
IN
A
10.0.0.50


;; AUTHORITY SECTION:
srv.world.
86400
IN
NS
ubuntu.srv.world.


;; Query time: 0 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Mon Jul 19 19:04:04 2010
;; MSG SIZE rcvd: 85
 
Tweet